home *** CD-ROM | disk | FTP | other *** search
/ Columbia Kermit / kermit.zip / newsgroups / misc.20010306-20010921 / 000313_fdc@watsun.cc.columbia.edu_Tue Aug 14 14:40:40 EDT 2001.msg < prev    next >
Text File  |  2020-01-01  |  3KB  |  72 lines

  1. Article: 12672 of comp.protocols.kermit.misc
  2. Path: newsmaster.cc.columbia.edu!watsun.cc.columbia.edu!fdc
  3. From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
  4. Newsgroups: comp.protocols.kermit.misc
  5. Subject: Re: Kermit Scripts and Shell Scripts
  6. Date: 14 Aug 2001 18:40:28 GMT
  7. Organization: Columbia University
  8. Lines: 55
  9. Message-ID: <9lbras$cfb$1@newsmaster.cc.columbia.edu>
  10. References: <336f652d.0108130841.43ce0ed5@posting.google.com> <336f652d.0108140545.1a1c8658@posting.google.com> <9lbdsm$35j$1@newsmaster.cc.columbia.edu> <336f652d.0108141029.39b5169f@posting.google.com>
  11. NNTP-Posting-Host: watsun.cc.columbia.edu
  12. X-Trace: newsmaster.cc.columbia.edu 997814428 12779 128.59.39.2 (14 Aug 2001 18:40:28 GMT)
  13. X-Complaints-To: postmaster@columbia.edu
  14. NNTP-Posting-Date: 14 Aug 2001 18:40:28 GMT
  15. Xref: newsmaster.cc.columbia.edu comp.protocols.kermit.misc:12672
  16.  
  17. In article <336f652d.0108141029.39b5169f@posting.google.com>,
  18. Shifeux <shifeux@hotmail.com> wrote:
  19. : I appologize for my 'jumbled' postings. I have several variations of
  20. : this script and I have ended up confusing the issue. The switch code
  21. : was just a different variation I tried when the IF and even XIF didn't
  22. : work for me. I plugged your piece of code into the script and I am
  23. : still getting the same result. The script crashes at the run <perl
  24. : script> command.
  25. :
  26. First of all, Kermit can run Perl or shell scripts if (a) they are
  27. executable, and (b) they begin with a line that specifies the script
  28. interpreter: sh, ksh, csh, bash, perl, kermit, or anything else.
  29.  
  30. : What I am trying to do from a theory standpoint is
  31. : parse a directory listing on a remote machine to get a listing of the
  32. : files in a text file. This text file will be converted into a listing
  33. : and sent back to the remote system after I download the files in the
  34. : dir.
  35. :
  36. Of course you can do all this with Kermit just as well as with Perl.
  37.  
  38. : I have a perl parse routine which does contain the
  39. : #!/usr/bin/perl in the first line
  40. :
  41. Is this the correct path for Perl?  Does /usr/bin/perl exist?
  42.  
  43. : (as a side note, my kermit script
  44. : does not contain a similar statement).
  45. :
  46. If it did, you could run it directly from the shell without having to
  47. start Kermit first.  See:
  48.  
  49.   http://www.columbia.edu/kermit/ckscripts.html
  50.  
  51. : The perl command will work
  52. : using the shell and using kermit, but when I use the 'run' command in
  53. : the script I have problems with the script itself. At the point of the
  54. : run command the script halts abruptly. It does not execute the perl
  55. : script at all which is indicated by no output file from the perl
  56. : script.  I have commented out the run command line and added an echo
  57. : command and i see the echo and the script continues on as expected.
  58. : But when the run command is followed by the perl script name the
  59. : script ends abruptly. Am I missing something in the way kermit calls
  60. : upon the shell to execute the perl script?
  61. Yes, you are missing something, but what you are missing is not obvious.
  62.  
  63. The command that is not working is:
  64.  
  65.   run /kermit_scripts/xxxxxxx.pl
  66.  
  67. The obvious question is: does the file /kermit_scripts/xxxxxxx.pl exist?
  68. Perhaps the initial slash shouldn't be there.
  69.  
  70. - Frank
  71.